package cn.test.controller;

import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextStoppedEvent;
import org.springframework.stereotype.Component;

/**
 * @author hanchao
 * @date 2017/9/18 14:44
 */
@Component
public class WebRegistListener implements ApplicationListener {

    @Override
    public void onApplicationEvent(ApplicationEvent event) {
        System.out.println(event.getClass());
        if(event instanceof ApplicationReadyEvent){

        }else if(event instanceof ContextStoppedEvent){
            
        }
    }
}
